// Copyright 2019 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0, included in the file
// licenses/APL.txt.

package main

// As of now, we only run a subset of the test apps within the django
// testing suite. The full set we run is below, and should be kept
// in alphabetical order. As more progress is made with adding compatibility,
// more test apps should be added here to prevent against regression.
var enabledDjangoTests = []string{
	"app_loading",
	"apps",
	"admin_changelist",
	"admin_custom_urls",
	"admin_docs",
	"admin_filters",
	"admin_inlines",
	"admin_ordering",
	"admin_utils",
	"admin_views",
	"aggregation",
	"aggregation_regress",
	"annotations",
	"auth_tests",
	"backends",
	"base",
	"bash_completion",
	"basic",
	"bulk_create",
	"cache",
	"check_framework",
	"conditional_processing",
	"constraints",
	"contenttypes_tests",
	"custom_columns",
	"custom_lookups",
	"custom_managers",
	"custom_methods",
	"custom_migration_operations",
	"custom_pk",
	"datatypes",
	"dates",
	"datetimes",
	"db_functions",
	"db_typecasts",
	"db_utils",
	"defer",
	"defer_regress",
	"delete",
	"delete_regress",
	"distinct_on_fields",
	"empty",
	"expressions",
	"expressions_case",
	"expressions_window",
	"extra_regress",
	"field_defaults",
	"field_subclassing",
	"file_storage",
	"file_uploads",
	"filtered_relation",
	"fixtures",
	"fixtures_model_package",
	"fixtures_regress",
	"force_insert_update",
	"foreign_object",
	"forms_tests",
	"from_db_value",
	"generic_inline_admin",
	"generic_relations",
	"generic_relations_regress",
	"generic_views",
	"get_earliest_or_latest",
	"get_object_or_404",
	"get_or_create",
	"i18n",
	"indexes",
	"inline_formsets",
	"inspectdb",
	"introspection",
	"invalid_models_tests",
	"known_related_objects",
	"lookup",
	"m2m_and_m2o",
	"m2m_intermediary",
	"m2m_multiple",
	"m2m_recursive",
	"m2m_regress",
	"m2m_signals",
	"m2m_through",
	"m2m_through_regress",
	"m2o_recursive",
	"managers_regress",
	"many_to_many",
	"many_to_one",
	"many_to_one_null",
	"max_lengths",
	"migrate_signals",
	"migrations",
	"migration_test_data_persistence",
	"modeladmin",
	"model_fields",
	"model_forms",
	"model_formsets",
	"model_formsets_regress",
	"model_indexes",
	"model_inheritance",
	"model_inheritance_regress",
	"model_meta",
	"model_options",
	"model_package",
	"model_regress",
	"multiple_database",
	"mutually_referential",
	"nested_foreign_keys",
	"null_fk",
	"null_fk_ordering",
	"null_queries",
	"one_to_one",
	"ordering",
	"order_with_respect_to",
	"or_lookups",
	"pagination",
	"prefetch_related",
	"properties",
	"proxy_model_inheritance",
	"proxy_models",
	"queries",
	"queryset_pickle",
	"raw_query",
	"reserved_names",
	"reverse_lookup",
	"save_delete_hooks",
	"schema",
	"select_for_update",
	"select_related",
	"select_related_onetoone",
	"select_related_regress",
	"serializers",
	"servers",
	"signals",
	"sitemaps_tests",
	"sites_framework",
	"sites_tests",
	"string_lookup",
	"swappable_models",
	"syndication_tests",
	"test_client",
	"test_client_regress",
	"test_utils",
	"timezones",
	"transaction_hooks",
	"transactions",
	"unmanaged_models",
	"update",
	"update_only_fields",
	"validation",
	"view_tests",
}

var djangoBlacklists = blacklistsForVersion{
	{"v19.2", "djangoBlacklist19_2", djangoBlacklist19_2, "djangoIgnoreList19_2", djangoIgnoreList19_2},
	{"v20.1", "djangoBlacklist20_1", djangoBlacklist20_1, "djangoIgnoreList20_1", djangoIgnoreList20_1},
}

// Maintain that this list is alphabetized.
var djangoBlacklist20_1 = blacklist{
	"admin_changelist.tests.SeleniumTests.test_add_row_selection":                                "unknown",
	"admin_custom_urls.tests.AdminCustomUrlsTest.test_post_url_continue":                         "unknown",
	"admin_docs.test_views.TestFieldType.test_field_name":                                        "unknown",
	"admin_filters.tests.ListFiltersTests.test_two_characters_long_field":                        "unknown",
	"admin_inlines.tests.SeleniumTests.test_delete_stackeds":                                     "unknown",
	"admin_utils.tests.UtilsTests.test_values_from_lookup_field":                                 "unknown",
	"admin_views.tests.GroupAdminTest.test_group_permission_performance":                         "unknown",
	"admin_views.tests.SecureViewTests.test_secure_view_shows_login_if_not_logged_in":            "unknown",
	"admin_views.tests.SecureViewTests.test_staff_member_required_decorator_works_with_argument": "unknown",
	"app_loading.tests.GetModelsTest.test_get_models_only_returns_installed_models":              "unknown",
	"apps.tests.AppConfigTests.test_repr":                                                        "unknown",
	"conditional_processing.tests.ConditionalGet.test_weak_if_none_match":                        "unknown",
	"db_typecasts.tests.DBTypeCasts.test_typeCasts":                                              "unknown",
	"field_subclassing.tests.TestDbType.test_db_parameters_respects_db_type":                     "unknown",
	"model_meta.tests.GetFieldsTests.test_get_fields_is_immutable":                               "unknown",
}

var djangoBlacklist19_2 = blacklist{
	// Blacklist generated from running the tests above.
	"admin_custom_urls.tests.AdminCustomUrlsTest.test_post_url_continue":                           "unknown",
	"admin_docs.test_views.TestFieldType.test_field_name":                                          "unknown",
	"admin_filters.tests.ListFiltersTests.test_two_characters_long_field":                          "unknown",
	"admin_inlines.tests.SeleniumTests.test_delete_stackeds":                                       "unknown",
	"admin_ordering.tests.TestRelatedFieldsAdminOrdering.test_no_admin_fallback_to_model_ordering": "unknown",
	"admin_utils.tests.UtilsTests.test_values_from_lookup_field":                                   "unknown",
	"admin_views.tests.AdminViewBasicTest.test_date_hierarchy_timezone_dst":                        "unknown",
	"app_loading.tests.GetModelsTest.test_get_models_only_returns_installed_models":                "unknown",
	"conditional_processing.tests.ConditionalGet.test_without_conditions":                          "unknown",
	"db_typecasts.tests.DBTypeCasts.test_typeCasts":                                                "unknown",
	"field_subclassing.tests.TestDbType.test_db_parameters_respects_db_type":                       "unknown",
	"model_meta.tests.GetFieldsTests.test_get_fields_is_immutable":                                 "unknown",
	// TODO (rohany): The postgres_tests suite within Django is not in a automatically
	//  runnable state right now.
	//"postgres_tests.test_aggregates.TestGeneralAggregate.test_bit_and_empty_result":                                 "41334",
	//"postgres_tests.test_aggregates.TestGeneralAggregate.test_bit_and_general":                                      "41334",
	//"postgres_tests.test_aggregates.TestGeneralAggregate.test_bit_and_on_only_false_values":                         "41334",
	//"postgres_tests.test_aggregates.TestGeneralAggregate.test_bit_and_on_only_true_values":                          "41334",
	//"postgres_tests.test_aggregates.TestGeneralAggregate.test_bit_or_empty_result":                                  "41334",
	//"postgres_tests.test_aggregates.TestGeneralAggregate.test_bit_or_general":                                       "41334",
	//"postgres_tests.test_aggregates.TestGeneralAggregate.test_bit_or_on_only_false_values":                          "41334",
	//"postgres_tests.test_aggregates.TestGeneralAggregate.test_bit_or_on_only_true_values":                           "41334",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_corr_empty_result":                                 "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_corr_general":                                      "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_covar_pop_empty_result":                            "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_covar_pop_general":                                 "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_covar_pop_sample":                                  "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_covar_pop_sample_empty_result":                     "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_avgx_empty_result":                            "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_avgx_general":                                 "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_avgx_with_related_obj_and_number_as_argument": "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_avgy_empty_result":                            "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_avgy_general":                                 "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_count_empty_result":                           "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_count_general":                                "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_intercept_empty_result":                       "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_intercept_general":                            "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_r2_empty_result":                              "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_r2_general":                                   "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_slope_empty_result":                           "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_slope_general":                                "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_sxx_empty_result":                             "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_sxx_general":                                  "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_sxy_empty_result":                             "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_sxy_general":                                  "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_syy_empty_result":                             "41274",
	//"postgres_tests.test_aggregates.TestStatisticsAggregate.test_regr_syy_general":                                  "41274",
	//"postgres_tests.test_array.TestOtherTypesExactQuerying.test_exact_decimals":                                     "23468",
}

var djangoIgnoreList20_1 = blacklist{}

var djangoIgnoreList19_2 = blacklist{}
